﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using GTServices.Entities;

namespace GTServices.ServiceContracts
{
    // Start the service and browse to http://<machine_name>:<port>/SampleService/help to view the service's generated help page
    [ServiceContract]
    public interface IPatternService
    {
        [WebGet(UriTemplate = "")]
        List<Pattern> GetPatterns();

        [WebInvoke(UriTemplate = "", Method = "POST")]
        Pattern Create(Pattern instance);

        [WebGet(UriTemplate = "?id={id}")]
        Pattern Get(int id);

        [WebInvoke(UriTemplate = "?id={id}", Method = "PUT")]
        Pattern Update(int id, Pattern instance);

        [WebInvoke(UriTemplate = "?id={id}", Method = "DELETE")]
        void Delete(int id);
    }
}
